package com.niiwoo.activity.stage.enums.goods;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum GiftStatusEnum {
	NOT_USE(10, "未使用", true, 1),
	WAITING_SEND(11, "待发放", true, 2),
	WAITING_PROVIDE(12, "等待发货", true, 3),
	
	USED(20, "已使用", false, 6),
	WAITING_CASH_BACK(21, "待返现", false, 4),
	SENDED(22, "已发放", false, 7),
	PROVIDED(23, "已发货", false, 8),
	AREADY_USED(24,"已使用",false,2),//借款利率折扣卡-新状态
	WAITING_REBATE(25,"已使用待返息",false,3),//借款利率折扣卡-新状态

	IN_REBATE(26,"返息中",false,4),//借款利率折扣卡-新状态

	CASH_BACKED(30, "已返现", false, 5),
	REBATE_BACKED(31,"已使用已返息",false,6),//借款利率折扣卡-新状态
	
	TIME_OUT(40, "已过期", false, 10),//该状态可能不会维护，需要根据截止时间判断
	
	SYSTEM_GC(51, "系统收回", false, 11),
	SCENE_SEND(52, "现场发放", false, 9)
	;
	
	private final Integer status;
	
	private final String desc;
	
	private final Boolean initialOrNot;//是否初始状态
	
	private final Integer sort;//用于我的礼品列表排序

	public static GiftStatusEnum enumOf(Integer value) {
		for (GiftStatusEnum statusEnum : values()) {
			if (statusEnum.status.equals(value)) {
				return statusEnum;
			}
		}
		return null;
	}
}
